(0) Obligation:

Runtime Complexity TRS:
The TRS R consists of the following rules:

gcd(x, y) → gcd2(x, y, 0)
gcd2(x, y, i) → if1(le(x, 0), le(y, 0), le(x, y), le(y, x), x, y, inc(i))
if1(true, b1, b2, b3, x, y, i) → pair(result(y), neededIterations(i))
if1(false, b1, b2, b3, x, y, i) → if2(b1, b2, b3, x, y, i)
if2(true, b2, b3, x, y, i) → pair(result(x), neededIterations(i))
if2(false, b2, b3, x, y, i) → if3(b2, b3, x, y, i)
if3(false, b3, x, y, i) → gcd2(minus(x, y), y, i)
if3(true, b3, x, y, i) → if4(b3, x, y, i)
if4(false, x, y, i) → gcd2(x, minus(y, x), i)
if4(true, x, y, i) → pair(result(x), neededIterations(i))
inc(0) → 0
inc(s(i)) → s(inc(i))
le(s(x), 0) → false
le(0, y) → true
le(s(x), s(y)) → le(x, y)
minus(x, 0) → x
minus(0, y) → 0
minus(s(x), s(y)) → minus(x, y)
ab
ac

Rewrite Strategy: INNERMOST

(1) RenamingProof (EQUIVALENT transformation)

Renamed function symbols to avoid clashes with predefined symbol.

(2) Obligation:

Runtime Complexity Relative TRS:
The TRS R consists of the following rules:

gcd(x, y) → gcd2(x, y, 0')
gcd2(x, y, i) → if1(le(x, 0'), le(y, 0'), le(x, y), le(y, x), x, y, inc(i))
if1(true, b1, b2, b3, x, y, i) → pair(result(y), neededIterations(i))
if1(false, b1, b2, b3, x, y, i) → if2(b1, b2, b3, x, y, i)
if2(true, b2, b3, x, y, i) → pair(result(x), neededIterations(i))
if2(false, b2, b3, x, y, i) → if3(b2, b3, x, y, i)
if3(false, b3, x, y, i) → gcd2(minus(x, y), y, i)
if3(true, b3, x, y, i) → if4(b3, x, y, i)
if4(false, x, y, i) → gcd2(x, minus(y, x), i)
if4(true, x, y, i) → pair(result(x), neededIterations(i))
inc(0') → 0'
inc(s(i)) → s(inc(i))
le(s(x), 0') → false
le(0', y) → true
le(s(x), s(y)) → le(x, y)
minus(x, 0') → x
minus(0', y) → 0'
minus(s(x), s(y)) → minus(x, y)
ab
ac

S is empty.
Rewrite Strategy: INNERMOST

(3) TypeInferenceProof (BOTH BOUNDS(ID, ID) transformation)

Infered types.

(4) Obligation:

Innermost TRS:
Rules:
gcd(x, y) → gcd2(x, y, 0')
gcd2(x, y, i) → if1(le(x, 0'), le(y, 0'), le(x, y), le(y, x), x, y, inc(i))
if1(true, b1, b2, b3, x, y, i) → pair(result(y), neededIterations(i))
if1(false, b1, b2, b3, x, y, i) → if2(b1, b2, b3, x, y, i)
if2(true, b2, b3, x, y, i) → pair(result(x), neededIterations(i))
if2(false, b2, b3, x, y, i) → if3(b2, b3, x, y, i)
if3(false, b3, x, y, i) → gcd2(minus(x, y), y, i)
if3(true, b3, x, y, i) → if4(b3, x, y, i)
if4(false, x, y, i) → gcd2(x, minus(y, x), i)
if4(true, x, y, i) → pair(result(x), neededIterations(i))
inc(0') → 0'
inc(s(i)) → s(inc(i))
le(s(x), 0') → false
le(0', y) → true
le(s(x), s(y)) → le(x, y)
minus(x, 0') → x
minus(0', y) → 0'
minus(s(x), s(y)) → minus(x, y)
ab
ac

Types:
gcd :: 0':s → 0':s → pair
gcd2 :: 0':s → 0':s → 0':s → pair
0' :: 0':s
if1 :: true:false → true:false → true:false → true:false → 0':s → 0':s → 0':s → pair
le :: 0':s → 0':s → true:false
inc :: 0':s → 0':s
true :: true:false
pair :: result → neededIterations → pair
result :: 0':s → result
neededIterations :: 0':s → neededIterations
false :: true:false
if2 :: true:false → true:false → true:false → 0':s → 0':s → 0':s → pair
if3 :: true:false → true:false → 0':s → 0':s → 0':s → pair
minus :: 0':s → 0':s → 0':s
if4 :: true:false → 0':s → 0':s → 0':s → pair
s :: 0':s → 0':s
a :: b:c
b :: b:c
c :: b:c
hole_pair1_0 :: pair
hole_0':s2_0 :: 0':s
hole_true:false3_0 :: true:false
hole_result4_0 :: result
hole_neededIterations5_0 :: neededIterations
hole_b:c6_0 :: b:c
gen_0':s7_0 :: Nat → 0':s

(5) OrderProof (LOWER BOUND(ID) transformation)

Heuristically decided to analyse the following defined symbols:
gcd2, le, inc, minus

They will be analysed ascendingly in the following order:
le < gcd2
inc < gcd2
minus < gcd2

(6) Obligation:

Innermost TRS:
Rules:
gcd(x, y) → gcd2(x, y, 0')
gcd2(x, y, i) → if1(le(x, 0'), le(y, 0'), le(x, y), le(y, x), x, y, inc(i))
if1(true, b1, b2, b3, x, y, i) → pair(result(y), neededIterations(i))
if1(false, b1, b2, b3, x, y, i) → if2(b1, b2, b3, x, y, i)
if2(true, b2, b3, x, y, i) → pair(result(x), neededIterations(i))
if2(false, b2, b3, x, y, i) → if3(b2, b3, x, y, i)
if3(false, b3, x, y, i) → gcd2(minus(x, y), y, i)
if3(true, b3, x, y, i) → if4(b3, x, y, i)
if4(false, x, y, i) → gcd2(x, minus(y, x), i)
if4(true, x, y, i) → pair(result(x), neededIterations(i))
inc(0') → 0'
inc(s(i)) → s(inc(i))
le(s(x), 0') → false
le(0', y) → true
le(s(x), s(y)) → le(x, y)
minus(x, 0') → x
minus(0', y) → 0'
minus(s(x), s(y)) → minus(x, y)
ab
ac

Types:
gcd :: 0':s → 0':s → pair
gcd2 :: 0':s → 0':s → 0':s → pair
0' :: 0':s
if1 :: true:false → true:false → true:false → true:false → 0':s → 0':s → 0':s → pair
le :: 0':s → 0':s → true:false
inc :: 0':s → 0':s
true :: true:false
pair :: result → neededIterations → pair
result :: 0':s → result
neededIterations :: 0':s → neededIterations
false :: true:false
if2 :: true:false → true:false → true:false → 0':s → 0':s → 0':s → pair
if3 :: true:false → true:false → 0':s → 0':s → 0':s → pair
minus :: 0':s → 0':s → 0':s
if4 :: true:false → 0':s → 0':s → 0':s → pair
s :: 0':s → 0':s
a :: b:c
b :: b:c
c :: b:c
hole_pair1_0 :: pair
hole_0':s2_0 :: 0':s
hole_true:false3_0 :: true:false
hole_result4_0 :: result
hole_neededIterations5_0 :: neededIterations
hole_b:c6_0 :: b:c
gen_0':s7_0 :: Nat → 0':s

Generator Equations:
gen_0':s7_0(0) ⇔ 0'
gen_0':s7_0(+(x, 1)) ⇔ s(gen_0':s7_0(x))

The following defined symbols remain to be analysed:
le, gcd2, inc, minus

They will be analysed ascendingly in the following order:
le < gcd2
inc < gcd2
minus < gcd2

(7) RewriteLemmaProof (LOWER BOUND(ID) transformation)

Proved the following rewrite lemma:
le(gen_0':s7_0(+(1, n9_0)), gen_0':s7_0(n9_0)) → false, rt ∈ Ω(1 + n90)

Induction Base:
le(gen_0':s7_0(+(1, 0)), gen_0':s7_0(0)) →RΩ(1)
false

Induction Step:
le(gen_0':s7_0(+(1, +(n9_0, 1))), gen_0':s7_0(+(n9_0, 1))) →RΩ(1)
le(gen_0':s7_0(+(1, n9_0)), gen_0':s7_0(n9_0)) →IH
false

We have rt ∈ Ω(n1) and sz ∈ O(n). Thus, we have ircR ∈ Ω(n).

(8) Complex Obligation (BEST)

(9) Obligation:

Innermost TRS:
Rules:
gcd(x, y) → gcd2(x, y, 0')
gcd2(x, y, i) → if1(le(x, 0'), le(y, 0'), le(x, y), le(y, x), x, y, inc(i))
if1(true, b1, b2, b3, x, y, i) → pair(result(y), neededIterations(i))
if1(false, b1, b2, b3, x, y, i) → if2(b1, b2, b3, x, y, i)
if2(true, b2, b3, x, y, i) → pair(result(x), neededIterations(i))
if2(false, b2, b3, x, y, i) → if3(b2, b3, x, y, i)
if3(false, b3, x, y, i) → gcd2(minus(x, y), y, i)
if3(true, b3, x, y, i) → if4(b3, x, y, i)
if4(false, x, y, i) → gcd2(x, minus(y, x), i)
if4(true, x, y, i) → pair(result(x), neededIterations(i))
inc(0') → 0'
inc(s(i)) → s(inc(i))
le(s(x), 0') → false
le(0', y) → true
le(s(x), s(y)) → le(x, y)
minus(x, 0') → x
minus(0', y) → 0'
minus(s(x), s(y)) → minus(x, y)
ab
ac

Types:
gcd :: 0':s → 0':s → pair
gcd2 :: 0':s → 0':s → 0':s → pair
0' :: 0':s
if1 :: true:false → true:false → true:false → true:false → 0':s → 0':s → 0':s → pair
le :: 0':s → 0':s → true:false
inc :: 0':s → 0':s
true :: true:false
pair :: result → neededIterations → pair
result :: 0':s → result
neededIterations :: 0':s → neededIterations
false :: true:false
if2 :: true:false → true:false → true:false → 0':s → 0':s → 0':s → pair
if3 :: true:false → true:false → 0':s → 0':s → 0':s → pair
minus :: 0':s → 0':s → 0':s
if4 :: true:false → 0':s → 0':s → 0':s → pair
s :: 0':s → 0':s
a :: b:c
b :: b:c
c :: b:c
hole_pair1_0 :: pair
hole_0':s2_0 :: 0':s
hole_true:false3_0 :: true:false
hole_result4_0 :: result
hole_neededIterations5_0 :: neededIterations
hole_b:c6_0 :: b:c
gen_0':s7_0 :: Nat → 0':s

Lemmas:
le(gen_0':s7_0(+(1, n9_0)), gen_0':s7_0(n9_0)) → false, rt ∈ Ω(1 + n90)

Generator Equations:
gen_0':s7_0(0) ⇔ 0'
gen_0':s7_0(+(x, 1)) ⇔ s(gen_0':s7_0(x))

The following defined symbols remain to be analysed:
inc, gcd2, minus

They will be analysed ascendingly in the following order:
inc < gcd2
minus < gcd2

(10) RewriteLemmaProof (LOWER BOUND(ID) transformation)

Proved the following rewrite lemma:
inc(gen_0':s7_0(n370_0)) → gen_0':s7_0(n370_0), rt ∈ Ω(1 + n3700)

Induction Base:
inc(gen_0':s7_0(0)) →RΩ(1)
0'

Induction Step:
inc(gen_0':s7_0(+(n370_0, 1))) →RΩ(1)
s(inc(gen_0':s7_0(n370_0))) →IH
s(gen_0':s7_0(c371_0))

We have rt ∈ Ω(n1) and sz ∈ O(n). Thus, we have ircR ∈ Ω(n).

(11) Complex Obligation (BEST)

(12) Obligation:

Innermost TRS:
Rules:
gcd(x, y) → gcd2(x, y, 0')
gcd2(x, y, i) → if1(le(x, 0'), le(y, 0'), le(x, y), le(y, x), x, y, inc(i))
if1(true, b1, b2, b3, x, y, i) → pair(result(y), neededIterations(i))
if1(false, b1, b2, b3, x, y, i) → if2(b1, b2, b3, x, y, i)
if2(true, b2, b3, x, y, i) → pair(result(x), neededIterations(i))
if2(false, b2, b3, x, y, i) → if3(b2, b3, x, y, i)
if3(false, b3, x, y, i) → gcd2(minus(x, y), y, i)
if3(true, b3, x, y, i) → if4(b3, x, y, i)
if4(false, x, y, i) → gcd2(x, minus(y, x), i)
if4(true, x, y, i) → pair(result(x), neededIterations(i))
inc(0') → 0'
inc(s(i)) → s(inc(i))
le(s(x), 0') → false
le(0', y) → true
le(s(x), s(y)) → le(x, y)
minus(x, 0') → x
minus(0', y) → 0'
minus(s(x), s(y)) → minus(x, y)
ab
ac

Types:
gcd :: 0':s → 0':s → pair
gcd2 :: 0':s → 0':s → 0':s → pair
0' :: 0':s
if1 :: true:false → true:false → true:false → true:false → 0':s → 0':s → 0':s → pair
le :: 0':s → 0':s → true:false
inc :: 0':s → 0':s
true :: true:false
pair :: result → neededIterations → pair
result :: 0':s → result
neededIterations :: 0':s → neededIterations
false :: true:false
if2 :: true:false → true:false → true:false → 0':s → 0':s → 0':s → pair
if3 :: true:false → true:false → 0':s → 0':s → 0':s → pair
minus :: 0':s → 0':s → 0':s
if4 :: true:false → 0':s → 0':s → 0':s → pair
s :: 0':s → 0':s
a :: b:c
b :: b:c
c :: b:c
hole_pair1_0 :: pair
hole_0':s2_0 :: 0':s
hole_true:false3_0 :: true:false
hole_result4_0 :: result
hole_neededIterations5_0 :: neededIterations
hole_b:c6_0 :: b:c
gen_0':s7_0 :: Nat → 0':s

Lemmas:
le(gen_0':s7_0(+(1, n9_0)), gen_0':s7_0(n9_0)) → false, rt ∈ Ω(1 + n90)
inc(gen_0':s7_0(n370_0)) → gen_0':s7_0(n370_0), rt ∈ Ω(1 + n3700)

Generator Equations:
gen_0':s7_0(0) ⇔ 0'
gen_0':s7_0(+(x, 1)) ⇔ s(gen_0':s7_0(x))

The following defined symbols remain to be analysed:
minus, gcd2

They will be analysed ascendingly in the following order:
minus < gcd2

(13) RewriteLemmaProof (LOWER BOUND(ID) transformation)

Proved the following rewrite lemma:
minus(gen_0':s7_0(n620_0), gen_0':s7_0(n620_0)) → gen_0':s7_0(0), rt ∈ Ω(1 + n6200)

Induction Base:
minus(gen_0':s7_0(0), gen_0':s7_0(0)) →RΩ(1)
gen_0':s7_0(0)

Induction Step:
minus(gen_0':s7_0(+(n620_0, 1)), gen_0':s7_0(+(n620_0, 1))) →RΩ(1)
minus(gen_0':s7_0(n620_0), gen_0':s7_0(n620_0)) →IH
gen_0':s7_0(0)

We have rt ∈ Ω(n1) and sz ∈ O(n). Thus, we have ircR ∈ Ω(n).

(14) Complex Obligation (BEST)

(15) Obligation:

Innermost TRS:
Rules:
gcd(x, y) → gcd2(x, y, 0')
gcd2(x, y, i) → if1(le(x, 0'), le(y, 0'), le(x, y), le(y, x), x, y, inc(i))
if1(true, b1, b2, b3, x, y, i) → pair(result(y), neededIterations(i))
if1(false, b1, b2, b3, x, y, i) → if2(b1, b2, b3, x, y, i)
if2(true, b2, b3, x, y, i) → pair(result(x), neededIterations(i))
if2(false, b2, b3, x, y, i) → if3(b2, b3, x, y, i)
if3(false, b3, x, y, i) → gcd2(minus(x, y), y, i)
if3(true, b3, x, y, i) → if4(b3, x, y, i)
if4(false, x, y, i) → gcd2(x, minus(y, x), i)
if4(true, x, y, i) → pair(result(x), neededIterations(i))
inc(0') → 0'
inc(s(i)) → s(inc(i))
le(s(x), 0') → false
le(0', y) → true
le(s(x), s(y)) → le(x, y)
minus(x, 0') → x
minus(0', y) → 0'
minus(s(x), s(y)) → minus(x, y)
ab
ac

Types:
gcd :: 0':s → 0':s → pair
gcd2 :: 0':s → 0':s → 0':s → pair
0' :: 0':s
if1 :: true:false → true:false → true:false → true:false → 0':s → 0':s → 0':s → pair
le :: 0':s → 0':s → true:false
inc :: 0':s → 0':s
true :: true:false
pair :: result → neededIterations → pair
result :: 0':s → result
neededIterations :: 0':s → neededIterations
false :: true:false
if2 :: true:false → true:false → true:false → 0':s → 0':s → 0':s → pair
if3 :: true:false → true:false → 0':s → 0':s → 0':s → pair
minus :: 0':s → 0':s → 0':s
if4 :: true:false → 0':s → 0':s → 0':s → pair
s :: 0':s → 0':s
a :: b:c
b :: b:c
c :: b:c
hole_pair1_0 :: pair
hole_0':s2_0 :: 0':s
hole_true:false3_0 :: true:false
hole_result4_0 :: result
hole_neededIterations5_0 :: neededIterations
hole_b:c6_0 :: b:c
gen_0':s7_0 :: Nat → 0':s

Lemmas:
le(gen_0':s7_0(+(1, n9_0)), gen_0':s7_0(n9_0)) → false, rt ∈ Ω(1 + n90)
inc(gen_0':s7_0(n370_0)) → gen_0':s7_0(n370_0), rt ∈ Ω(1 + n3700)
minus(gen_0':s7_0(n620_0), gen_0':s7_0(n620_0)) → gen_0':s7_0(0), rt ∈ Ω(1 + n6200)

Generator Equations:
gen_0':s7_0(0) ⇔ 0'
gen_0':s7_0(+(x, 1)) ⇔ s(gen_0':s7_0(x))

The following defined symbols remain to be analysed:
gcd2

(16) NoRewriteLemmaProof (LOWER BOUND(ID) transformation)

Could not prove a rewrite lemma for the defined symbol gcd2.

(17) Obligation:

Innermost TRS:
Rules:
gcd(x, y) → gcd2(x, y, 0')
gcd2(x, y, i) → if1(le(x, 0'), le(y, 0'), le(x, y), le(y, x), x, y, inc(i))
if1(true, b1, b2, b3, x, y, i) → pair(result(y), neededIterations(i))
if1(false, b1, b2, b3, x, y, i) → if2(b1, b2, b3, x, y, i)
if2(true, b2, b3, x, y, i) → pair(result(x), neededIterations(i))
if2(false, b2, b3, x, y, i) → if3(b2, b3, x, y, i)
if3(false, b3, x, y, i) → gcd2(minus(x, y), y, i)
if3(true, b3, x, y, i) → if4(b3, x, y, i)
if4(false, x, y, i) → gcd2(x, minus(y, x), i)
if4(true, x, y, i) → pair(result(x), neededIterations(i))
inc(0') → 0'
inc(s(i)) → s(inc(i))
le(s(x), 0') → false
le(0', y) → true
le(s(x), s(y)) → le(x, y)
minus(x, 0') → x
minus(0', y) → 0'
minus(s(x), s(y)) → minus(x, y)
ab
ac

Types:
gcd :: 0':s → 0':s → pair
gcd2 :: 0':s → 0':s → 0':s → pair
0' :: 0':s
if1 :: true:false → true:false → true:false → true:false → 0':s → 0':s → 0':s → pair
le :: 0':s → 0':s → true:false
inc :: 0':s → 0':s
true :: true:false
pair :: result → neededIterations → pair
result :: 0':s → result
neededIterations :: 0':s → neededIterations
false :: true:false
if2 :: true:false → true:false → true:false → 0':s → 0':s → 0':s → pair
if3 :: true:false → true:false → 0':s → 0':s → 0':s → pair
minus :: 0':s → 0':s → 0':s
if4 :: true:false → 0':s → 0':s → 0':s → pair
s :: 0':s → 0':s
a :: b:c
b :: b:c
c :: b:c
hole_pair1_0 :: pair
hole_0':s2_0 :: 0':s
hole_true:false3_0 :: true:false
hole_result4_0 :: result
hole_neededIterations5_0 :: neededIterations
hole_b:c6_0 :: b:c
gen_0':s7_0 :: Nat → 0':s

Lemmas:
le(gen_0':s7_0(+(1, n9_0)), gen_0':s7_0(n9_0)) → false, rt ∈ Ω(1 + n90)
inc(gen_0':s7_0(n370_0)) → gen_0':s7_0(n370_0), rt ∈ Ω(1 + n3700)
minus(gen_0':s7_0(n620_0), gen_0':s7_0(n620_0)) → gen_0':s7_0(0), rt ∈ Ω(1 + n6200)

Generator Equations:
gen_0':s7_0(0) ⇔ 0'
gen_0':s7_0(+(x, 1)) ⇔ s(gen_0':s7_0(x))

No more defined symbols left to analyse.

(18) LowerBoundsProof (EQUIVALENT transformation)

The lowerbound Ω(n1) was proven with the following lemma:
le(gen_0':s7_0(+(1, n9_0)), gen_0':s7_0(n9_0)) → false, rt ∈ Ω(1 + n90)

(19) BOUNDS(n^1, INF)

(20) Obligation:

Innermost TRS:
Rules:
gcd(x, y) → gcd2(x, y, 0')
gcd2(x, y, i) → if1(le(x, 0'), le(y, 0'), le(x, y), le(y, x), x, y, inc(i))
if1(true, b1, b2, b3, x, y, i) → pair(result(y), neededIterations(i))
if1(false, b1, b2, b3, x, y, i) → if2(b1, b2, b3, x, y, i)
if2(true, b2, b3, x, y, i) → pair(result(x), neededIterations(i))
if2(false, b2, b3, x, y, i) → if3(b2, b3, x, y, i)
if3(false, b3, x, y, i) → gcd2(minus(x, y), y, i)
if3(true, b3, x, y, i) → if4(b3, x, y, i)
if4(false, x, y, i) → gcd2(x, minus(y, x), i)
if4(true, x, y, i) → pair(result(x), neededIterations(i))
inc(0') → 0'
inc(s(i)) → s(inc(i))
le(s(x), 0') → false
le(0', y) → true
le(s(x), s(y)) → le(x, y)
minus(x, 0') → x
minus(0', y) → 0'
minus(s(x), s(y)) → minus(x, y)
ab
ac

Types:
gcd :: 0':s → 0':s → pair
gcd2 :: 0':s → 0':s → 0':s → pair
0' :: 0':s
if1 :: true:false → true:false → true:false → true:false → 0':s → 0':s → 0':s → pair
le :: 0':s → 0':s → true:false
inc :: 0':s → 0':s
true :: true:false
pair :: result → neededIterations → pair
result :: 0':s → result
neededIterations :: 0':s → neededIterations
false :: true:false
if2 :: true:false → true:false → true:false → 0':s → 0':s → 0':s → pair
if3 :: true:false → true:false → 0':s → 0':s → 0':s → pair
minus :: 0':s → 0':s → 0':s
if4 :: true:false → 0':s → 0':s → 0':s → pair
s :: 0':s → 0':s
a :: b:c
b :: b:c
c :: b:c
hole_pair1_0 :: pair
hole_0':s2_0 :: 0':s
hole_true:false3_0 :: true:false
hole_result4_0 :: result
hole_neededIterations5_0 :: neededIterations
hole_b:c6_0 :: b:c
gen_0':s7_0 :: Nat → 0':s

Lemmas:
le(gen_0':s7_0(+(1, n9_0)), gen_0':s7_0(n9_0)) → false, rt ∈ Ω(1 + n90)
inc(gen_0':s7_0(n370_0)) → gen_0':s7_0(n370_0), rt ∈ Ω(1 + n3700)
minus(gen_0':s7_0(n620_0), gen_0':s7_0(n620_0)) → gen_0':s7_0(0), rt ∈ Ω(1 + n6200)

Generator Equations:
gen_0':s7_0(0) ⇔ 0'
gen_0':s7_0(+(x, 1)) ⇔ s(gen_0':s7_0(x))

No more defined symbols left to analyse.

(21) LowerBoundsProof (EQUIVALENT transformation)

The lowerbound Ω(n1) was proven with the following lemma:
le(gen_0':s7_0(+(1, n9_0)), gen_0':s7_0(n9_0)) → false, rt ∈ Ω(1 + n90)

(22) BOUNDS(n^1, INF)

(23) Obligation:

Innermost TRS:
Rules:
gcd(x, y) → gcd2(x, y, 0')
gcd2(x, y, i) → if1(le(x, 0'), le(y, 0'), le(x, y), le(y, x), x, y, inc(i))
if1(true, b1, b2, b3, x, y, i) → pair(result(y), neededIterations(i))
if1(false, b1, b2, b3, x, y, i) → if2(b1, b2, b3, x, y, i)
if2(true, b2, b3, x, y, i) → pair(result(x), neededIterations(i))
if2(false, b2, b3, x, y, i) → if3(b2, b3, x, y, i)
if3(false, b3, x, y, i) → gcd2(minus(x, y), y, i)
if3(true, b3, x, y, i) → if4(b3, x, y, i)
if4(false, x, y, i) → gcd2(x, minus(y, x), i)
if4(true, x, y, i) → pair(result(x), neededIterations(i))
inc(0') → 0'
inc(s(i)) → s(inc(i))
le(s(x), 0') → false
le(0', y) → true
le(s(x), s(y)) → le(x, y)
minus(x, 0') → x
minus(0', y) → 0'
minus(s(x), s(y)) → minus(x, y)
ab
ac

Types:
gcd :: 0':s → 0':s → pair
gcd2 :: 0':s → 0':s → 0':s → pair
0' :: 0':s
if1 :: true:false → true:false → true:false → true:false → 0':s → 0':s → 0':s → pair
le :: 0':s → 0':s → true:false
inc :: 0':s → 0':s
true :: true:false
pair :: result → neededIterations → pair
result :: 0':s → result
neededIterations :: 0':s → neededIterations
false :: true:false
if2 :: true:false → true:false → true:false → 0':s → 0':s → 0':s → pair
if3 :: true:false → true:false → 0':s → 0':s → 0':s → pair
minus :: 0':s → 0':s → 0':s
if4 :: true:false → 0':s → 0':s → 0':s → pair
s :: 0':s → 0':s
a :: b:c
b :: b:c
c :: b:c
hole_pair1_0 :: pair
hole_0':s2_0 :: 0':s
hole_true:false3_0 :: true:false
hole_result4_0 :: result
hole_neededIterations5_0 :: neededIterations
hole_b:c6_0 :: b:c
gen_0':s7_0 :: Nat → 0':s

Lemmas:
le(gen_0':s7_0(+(1, n9_0)), gen_0':s7_0(n9_0)) → false, rt ∈ Ω(1 + n90)
inc(gen_0':s7_0(n370_0)) → gen_0':s7_0(n370_0), rt ∈ Ω(1 + n3700)

Generator Equations:
gen_0':s7_0(0) ⇔ 0'
gen_0':s7_0(+(x, 1)) ⇔ s(gen_0':s7_0(x))

No more defined symbols left to analyse.

(24) LowerBoundsProof (EQUIVALENT transformation)

The lowerbound Ω(n1) was proven with the following lemma:
le(gen_0':s7_0(+(1, n9_0)), gen_0':s7_0(n9_0)) → false, rt ∈ Ω(1 + n90)

(25) BOUNDS(n^1, INF)

(26) Obligation:

Innermost TRS:
Rules:
gcd(x, y) → gcd2(x, y, 0')
gcd2(x, y, i) → if1(le(x, 0'), le(y, 0'), le(x, y), le(y, x), x, y, inc(i))
if1(true, b1, b2, b3, x, y, i) → pair(result(y), neededIterations(i))
if1(false, b1, b2, b3, x, y, i) → if2(b1, b2, b3, x, y, i)
if2(true, b2, b3, x, y, i) → pair(result(x), neededIterations(i))
if2(false, b2, b3, x, y, i) → if3(b2, b3, x, y, i)
if3(false, b3, x, y, i) → gcd2(minus(x, y), y, i)
if3(true, b3, x, y, i) → if4(b3, x, y, i)
if4(false, x, y, i) → gcd2(x, minus(y, x), i)
if4(true, x, y, i) → pair(result(x), neededIterations(i))
inc(0') → 0'
inc(s(i)) → s(inc(i))
le(s(x), 0') → false
le(0', y) → true
le(s(x), s(y)) → le(x, y)
minus(x, 0') → x
minus(0', y) → 0'
minus(s(x), s(y)) → minus(x, y)
ab
ac

Types:
gcd :: 0':s → 0':s → pair
gcd2 :: 0':s → 0':s → 0':s → pair
0' :: 0':s
if1 :: true:false → true:false → true:false → true:false → 0':s → 0':s → 0':s → pair
le :: 0':s → 0':s → true:false
inc :: 0':s → 0':s
true :: true:false
pair :: result → neededIterations → pair
result :: 0':s → result
neededIterations :: 0':s → neededIterations
false :: true:false
if2 :: true:false → true:false → true:false → 0':s → 0':s → 0':s → pair
if3 :: true:false → true:false → 0':s → 0':s → 0':s → pair
minus :: 0':s → 0':s → 0':s
if4 :: true:false → 0':s → 0':s → 0':s → pair
s :: 0':s → 0':s
a :: b:c
b :: b:c
c :: b:c
hole_pair1_0 :: pair
hole_0':s2_0 :: 0':s
hole_true:false3_0 :: true:false
hole_result4_0 :: result
hole_neededIterations5_0 :: neededIterations
hole_b:c6_0 :: b:c
gen_0':s7_0 :: Nat → 0':s

Lemmas:
le(gen_0':s7_0(+(1, n9_0)), gen_0':s7_0(n9_0)) → false, rt ∈ Ω(1 + n90)

Generator Equations:
gen_0':s7_0(0) ⇔ 0'
gen_0':s7_0(+(x, 1)) ⇔ s(gen_0':s7_0(x))

No more defined symbols left to analyse.

(27) LowerBoundsProof (EQUIVALENT transformation)

The lowerbound Ω(n1) was proven with the following lemma:
le(gen_0':s7_0(+(1, n9_0)), gen_0':s7_0(n9_0)) → false, rt ∈ Ω(1 + n90)

(28) BOUNDS(n^1, INF)